﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MMS.Bll;

namespace MMS
{
    public partial class Form1 : CCWin.CCSkinMain
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void txtId_Paint(object sender, PaintEventArgs e)
        {

        }

        private void btnLogin_Click(object sender, EventArgs e)
        {
            string name = txtName.Text;
            string pass = txtPass.Text;
            AdminManager am = new AdminManager();

            AdminInfo admin = am.UserLogin(name, pass);
            if (admin != null)//判断是否查询到数据
            {
                MessageBox.Show(@"登录成功,您的信息如下:
编号:" + admin.AdminId + "登录名:" + admin.AdminName + "角色:" + admin.AdminRole);
            }
            else
            {
                MessageBox.Show("登录失败，用户名或者密码错误");
            }
        }
    }
}
